package org.sy.lab.多线程基础._2_同步._2_ReentrantLock._4_使用条件;

public class Bar {
	
	private int beer = 100;
	
	public void getBeer() {
		beer--;
		System.out.println(Thread.currentThread().getName() + "取走1瓶酒，酒窖剩余：" + beer);
	}
	
	public boolean hasBeer() {
		return beer>0 ? true:false;
	}
}
